-
Notifications
You must be signed in to change notification settings - Fork 25
Update keepalive field for http upstreams #311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update keepalive field for http upstreams #311
Conversation
@dhurley are you not able to see the number of keepalive without this fix? I don't see how it was able to unmarshal it with the wrong field name 🤔 |
From my testing, if a field defined in your struct that isn't in the json payload then it just defaults to zero. It doesn't error out. |
Sorry I didn't phrase it the best way, I was just wondering if you confirmed that this never worked before (since it always had the extra s) 😅 |
Yes I can confirm it never worked. Here is an example curl request I made against the Plus API confirming that it is
|
@lucacome is this ok to be merged? |
@oliveromahony it's ok for me |
Proposed changes
According to the docs here https://nginx.org/en/docs/http/ngx_http_api_module.html#def_nginx_http_upstream, the keepalive field is called
keepalive
notkeepalives
.This PR fixes the field name in the Upstream struct.
Checklist
Before creating a PR, run through this checklist and mark each as complete.